home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / win / ch18 / 18fig24.wrl < prev    next >
Text File  |  1996-09-23  |  1KB  |  52 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright [1997] By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # Chain-link fence
  8.         Shape {
  9.             appearance Appearance {
  10.                 material Material { }
  11.                 texture ImageTexture {
  12.                     url "grill.png"
  13.                 }
  14.                 textureTransform TextureTransform {
  15.                     rotation 0.785
  16.                     scale 32.0 8.0
  17.                     center 0.5 0.5
  18.                 }
  19.             }
  20.             geometry IndexedFaceSet {
  21.                 solid FALSE
  22.                 coord Coordinate {
  23.                     point [
  24.                         -4.0 -1.0 0.1,   4.0 -1.0 0.1,
  25.                          4.0  1.0 0.1,  -4.0  1.0 0.1,
  26.                     ]
  27.                 }
  28.                 coordIndex [ 0, 1, 2, 3 ]
  29.                 texCoord TextureCoordinate {
  30.                     point [
  31.                         0.0 0.0,  1.0 0.0,
  32.                         1.0 1.0,  0.0 1.0,
  33.                     ]
  34.                 }
  35.                 texCoordIndex [ 0, 1, 2, 3 ]
  36.             }
  37.         },
  38.     # Fence posts
  39.         DEF Post Shape {
  40.             appearance Appearance {
  41.                 material Material { }
  42.             }
  43.             geometry Cylinder {
  44.                 height 2.0
  45.                 radius 0.1
  46.             }
  47.         },
  48.         Transform { translation -4.0 0.0 0.0  children USE Post },
  49.         Transform { translation  4.0 0.0 0.0  children USE Post }
  50.     ]
  51. }
  52.